String.prototype.unique = function () {
    let obj = {}
    str = ""
    len = this.length
    for (let i = 0; i < len; i++) {
        if (!obj[this[i]]) {
            str += this[i]
            obj[this[i]] = true
        }
    }
    return str
}

function uniq(str) {
    return str.replace(/(\w)\1+/g, "$1")
}
